<?php
// +----------------------------------------------------------------------
// | quanli team
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2020 http://www.fistforward.com/ All rights reserved.
// +----------------------------------------------------------------------
// | create by allen.qiang
// +----------------------------------------------------------------------


/**
 * 资源位操作功能
 * @package  htdocs 
 * @subpackage  quanliadmin
 * @create by allen.qiang
 */


quanli_require('module/base/contentHandler.class.php');

class pa_navigation {

    public function execute() {

        if (isset($_REQUEST['operFlg']) && is_numeric($_REQUEST['operFlg']) && $_REQUEST['operFlg'] > 0) {

            switch ($_REQUEST['operFlg']) {
                case 1:
                    $this->navList();
                    break;
                default:
                    $this->toError('参数错误');
                    break;

            }

        } else {

            $this->toError('参数错误');

        }

    }

    /**
     * 转跳到错误页面
     * @param string $msg 错误信息
     */
    private function toError( $msg = '' ) {

        global $G_PGLOB;

        $G_PGLOB->display_error_page( $msg );

    }

    /**
     * 导航列表
     * @author youlong
     *
     */
    private function navList() {

        global $G_PGLOB;

        $contentHandler = new contentHandler($G_PGLOB->DBCA);

        $arg_array = array(
            'sortname' => 'navSort',
            'sortorder' => 'asc'
        );

        $navData = $contentHandler->searchNavList($arg_array);

        $G_PGLOB->smarty->assign_by_ref('navData',$navData);

        $G_PGLOB->smarty->display('content/navigationList.tpl'); 

    }

}